import request from '@/utils/request'

//vehicle
export function findByPageVehicle(query) {
  return request({
    url: '/vehicle/findBy',
    method: 'post',
    params:query //表单数据
  })
}
  export function deleteVehicle(vehicleId) {
    return request({
      url: '/vehicle/deleteById',
      method: 'get',
      params:{"vehicleId":vehicleId}//form
    })
  }
  export function addVehicle(data) {
    return request({
      url: '/vehicle/add',
      method: 'post',
      data//json
    })
  }
  
  export function updateVehicle(data) {
    return request({
      url: '/vehicle/update',
      method: 'post',
      data//json
    })
  }

  //parkingSpace
  export function findByPageParkingSpace(query) {
    return request({
      url: '/parkingSpace/findBy',
      method: 'post',
      params:query //表单数据
    })
  }
    export function updateParkingSpace(data) {
      return request({
        url: '/parkingSpace/update',
        method: 'post',
        data//json
      })
    }
    //parkingRecord
    export function findByPageParkingRecord(query) {
        return request({
          url: '/parkingRecord/findBy',
          method: 'post',
          params:query //表单数据
        })
      }
        export function deleteParkingRecord(parkingRecordId) {
          return request({
            url: '/parkingRecord/deleteById',
            method: 'get',
            params:{"parkingRecordId":parkingRecordId}//form
          })
        }
        export function addParkingRecord(data) {
          return request({
            url: '/parkingRecord/add',
            method: 'post',
            data//json
          })
        }
        
        export function updateParkingRecord(data) {
          return request({
            url: '/parkingRecord/update',
            method: 'post',
            data//json
          })
        }
